function out = my_cat(dim,varargin)
	% out = my_cat(dim,X1,X2,X3,...)
	% -------- custom function ------
	% description:
	%	cat column vectors that differs in size
	% input:
	%	dim: dimension to cat
	%	X1,X2,...: double, column vector
	% output:
	%	out: 
	% Author: Sid Chen
	% Date: 2022/04/09
	
	switch dim
		case 1
			error('dimension not support!')
		case 2
			% check input
			if all(cellfun(@ismatrix,varargin))
				MaxNumber = max(cellfun('size',varargin,1));
				for ii = 1:numel(varargin)
					varargin{ii}(end+1:MaxNumber,:) = NaN;
				end
				out = cell2mat(varargin);
			else
				error('must be column vector')
			end
		otherwise
			error('dimension not support!')
		end
end


